package com.qt.pojo.entity.problem;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.qt.pojo.base.BaseDO;
import lombok.*;
import lombok.experimental.Accessors;

import java.util.Date;

/**
 * @author pgw
 * @version 1.0
 * @description
 * @date Create by 2023/9/20 20:59
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = true)
@TableName("problem")
public class Problem  extends BaseDO {


    @TableId(type = IdType.AUTO)
    private Long id;

    /**
     * 题目的自定义id 例如(a100)
     */
    @TableField(value = "display_problem_id")
    private String displayProblemId;


    private  String oj;

    /**
     * 题目
     */
    private String title;

    /**
     * 作者
     */
    private String author;

    /**
     * 0为acm，1为oi
     */
    private Integer type;

    /**
     * 单位ms
     */
    private Integer timeLimit;

    /**
     * 单位kb
     */
    private Integer memoryLimit;

    /**
     * 单位mb
     */
    private Integer stackLimit;

    /**
     * 描述
     */
    private String description;

    /**
     * 输入描述
     */
    private String input;

    /**
     * 输出描述
     */
    private String output;

    /**
     * 题目样例
     */
    private String examples;

    /**
     * 题目难度
     */
    private Integer difficulty;

    /**
     * 题目为oi时的分数
     */
    private Integer oiScore;

    /**
     * 修改题目的管理员用户名
     */
    private String modifiedUser;

    /**
     * deleted
     */
    private Integer deleted;

    @TableField(fill = FieldFill.INSERT)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date gmtCreate;


    @TableField(fill = FieldFill.INSERT_UPDATE)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date gmtModified;

}
